import Vue from 'vue'
import VueRouter from 'vue-router'
// import { createWebHashHistory } from 'vue-router'
import Main from '../components/Main.vue'
import Content from '../components/Content.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: 'main'
  },
  {
    path: '/main',
    name: 'Main',
    component: Main
  },
  {
    path: '/content/:scc?:img',
    name: 'content',
    component: Content
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  // history:createWebHashHistory(process.env.BASE_URL),
  // mode: 'history',
  // base: '/apps/sas/prm/web/listedcompanies/',
  routes
})

export default router
